#define _CRT_SECURE_NO_WARNINGS 1

#include"BSTree.h";
#include"BSTree_kval.h"
using namespace std;
using namespace key_mode;


void test1()
{
	int arr[] = { 3,3,12,43,22,5,6,78,4,3,2,4,5 };
	BSTree<int> B;
	for (auto& e : arr)
	{
		B.InsertR(e);
	}
	//cout << B.FindR(3) << endl;
	//cout << B.FindR(100) << endl;
	//cout << B.FindR(78) << endl;

	B.EraseR(2);
	B.EraseR(43);

	B.InOrder();
}

void test2()
{
	int arr[] = { 3,3,12,43,22,5,6,78,4,3,2,4,5 };
	BSTree<int> B;

	for (auto& e : arr)
	{
		B.InsertR(e);
	}

	BSTree<int> B1(B);
	BSTree<int> B2;
	B2 = B;

	cout << "B:";
	B.InOrder();
	cout << "B1:";
	B1.InOrder();
	cout << "B2:";
	B2.InOrder();
}


int main()
{
	test2();
	return 0;
}